<template>
    <div class="passwordModel">
        <div class="headerTitle">
            <img src="../assets/fanhuijiantou.png" class="goBlack" alt="" v-if="isDark == 1" @click="goBlack">
            <img src="../assets/fanhuijiantou1.png" class="goBlack" alt="" v-if="isDark == 0" @click="goBlack">
            {{ $t("upPassword") }}
        </div>
        <div class="card">
            <div class="font12 m_b_10">{{ $t('ymm') }}</div>
            <div style="color: var(--tradeGL)" class="inputModel">
                <input :type="type1" class="input" :placeholder="$t('qsr')+$t('ymm')">
                <img src="../assets/htmal5icon8.png" class="icon" alt=""  v-if="type1=='password' && isDark == 1" @click="type1='text'">
                <img src="../assets/htmal5icon9.png" class="icon" alt="" v-if="type1=='text' && isDark == 1" @click="type1='password'">
                <img src="../assets/htmal5icon08.png" class="icon" alt=""  v-if="type1=='password' && isDark == 0" @click="type1='text'">
                <img src="../assets/htmal5icon09.png" class="icon" alt="" v-if="type1=='text' && isDark == 0" @click="type1='password'">
            </div>
        </div>
        <div class="card">
            <div class="font12 m_b_10">{{ $t('xmm') }}</div>
            <div style="color: var(--tradeGL)" class="inputModel">
                <input  :type="type2" class="input" :placeholder="$t('qsr')+$t('xmm') ">
                <img src="../assets/htmal5icon8.png" class="icon" alt=""  v-if="type2=='password' && isDark == 1" @click="type2='text'">
                <img src="../assets/htmal5icon9.png" class="icon" alt="" v-if="type2=='text' && isDark == 1" @click="type2='password'">
                <img src="../assets/htmal5icon08.png" class="icon" alt=""  v-if="type2=='password' && isDark == 0" @click="type2='text'">
                <img src="../assets/htmal5icon09.png" class="icon" alt="" v-if="type2=='text' && isDark == 0" @click="type2='password'">
            </div>
        </div>
        <div class="card">
            <div class="font12 m_b_10">{{ $t('cxsrxmm') }}</div>
            <div style="color: var(--tradeGL)" class="inputModel">
                <input  :type="type3" class="input" :placeholder="$t('cxsrxmm')">
                <img src="../assets/htmal5icon8.png" class="icon" alt=""  v-if="type3=='password' && isDark == 1" @click="type3='text'">
                <img src="../assets/htmal5icon9.png" class="icon" alt="" v-if="type3=='text' && isDark == 1" @click="type3='password'">
                <img src="../assets/htmal5icon08.png" class="icon" alt=""  v-if="type3=='password' && isDark == 0" @click="type3='text'">
                <img src="../assets/htmal5icon09.png" class="icon" alt="" v-if="type3=='text' && isDark == 0" @click="type3='password'">
            </div>
        </div>
        <div class="fixedBtnqr" >
                    {{ $t('qr') }}
         </div>
    </div>
</template>
<script setup>
import { ref, onMounted, defineEmits } from 'vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const isDark = ref(0)
const type1=ref('password')
const type2=ref('password')
const type3=ref('password')
onMounted(() => {
    if (localStorage.getItem('isDark')) {
        isDark.value = localStorage.getItem('isDark')
    }
})
const goBlack = () => {
    router.go(-1)
}
</script>
<style lang="less" scoped>
.passwordModel {
    height: calc(100vh - 50px);
    padding: 10px;
    box-sizing: border-box;

    .headerTitle {
        width: 100%;
        text-align: center;
        height: 28px;
        line-height: 28px;
        color: var(--textColor);
        position: relative;
    }

    .card {
        margin: 15px 0 10px;
        padding: 10px;
        border-radius: 5px;

        .input {
            background: transparent;
            border: 0;
            width: 100%;
        }

    }

    .goBlack {
        top: 50%;
        transform: translate(0, -50%);
        left: 10px;
        width: 20px;
        height: 20px;
        position: absolute;

    }
    .fixedBtnqr{
        font-size: 13px;
    line-height: 13px;
    color: #fff;
    width: calc(100% - 30px);
    text-align: center;
    padding: 15px 0;
    background-color: #203b87;
    box-sizing: border-box;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
        }
        .inputModel{
            width: 120%;
            position: relative;
            padding: 10px;
            border: 1px solid var(--homeCardBg);
            border-radius: 55px;
            transform: scale(0.8) translate(-12%);
           .icon{
            width: 25px;
            height: 25px;
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translate(-50%,-50%);
           }
        }
}</style>